<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "company".
 *
 * @property integer $company_id
 * @property string $company_name
 * @property string $company_plate
 * @property string $company_mdm_id
 * @property string $company_parent_mdm_id
 * @property string $company_hr_id
 * @property string $company_finance_id
 * @property string $company_import_id
 * @property integer $company_market_if
 * @property string $company_abb
 * @property string $company_ct_start_date
 * @property string $company_ct_end_date
 * @property string $company_most_abb
 * @property double $company_longitude
 * @property double $company_latitude
 * @property string $company_update_reason
 * @property string $company_memo
 * @property integer $company_hr_status
 * @property integer $company_mdm_status
 * @property string $company_created_by
 * @property string $company_created_at
 * @property string $company_updated_by
 * @property string $company_updated_at
 */
class Company extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'company';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['company_name'], 'required'],
            [['company_market_if', 'company_hr_status', 'company_mdm_status'], 'integer'],
            [['company_ct_start_date', 'company_ct_end_date', 'company_created_at', 'company_updated_at'], 'safe'],
            [['company_longitude', 'company_latitude'], 'number'],
            [['company_name', 'company_plate', 'company_mdm_id', 'company_parent_mdm_id', 'company_hr_id', 'company_finance_id', 'company_import_id', 'company_abb', 'company_most_abb', 'company_update_reason', 'company_memo'], 'string', 'max' => 255],
            [['company_created_by', 'company_updated_by'], 'string', 'max' => 45],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'company_id' => Yii::t('app', 'Company ID'),
            'company_name' => Yii::t('app', 'Company Name'),
            'company_plate' => Yii::t('app', 'Company Plate'),
            'company_mdm_id' => Yii::t('app', 'Company Mdm ID'),
            'company_parent_mdm_id' => Yii::t('app', 'Company Parent Mdm ID'),
            'company_hr_id' => Yii::t('app', 'Company Hr ID'),
            'company_finance_id' => Yii::t('app', 'Company Finance ID'),
            'company_import_id' => Yii::t('app', 'Company Import ID'),
            'company_market_if' => Yii::t('app', 'Company Market If'),
            'company_abb' => Yii::t('app', 'Company Abb'),
            'company_ct_start_date' => Yii::t('app', 'Company Ct Start Date'),
            'company_ct_end_date' => Yii::t('app', 'Company Ct End Date'),
            'company_most_abb' => Yii::t('app', 'Company Most Abb'),
            'company_longitude' => Yii::t('app', 'Company Longitude'),
            'company_latitude' => Yii::t('app', 'Company Latitude'),
            'company_update_reason' => Yii::t('app', 'Company Update Reason'),
            'company_memo' => Yii::t('app', 'Company Memo'),
            'company_hr_status' => Yii::t('app', 'Company Hr Status'),
            'company_mdm_status' => Yii::t('app', 'Company Mdm Status'),
            'company_created_by' => Yii::t('app', 'Company Created By'),
            'company_created_at' => Yii::t('app', 'Company Created At'),
            'company_updated_by' => Yii::t('app', 'Company Updated By'),
            'company_updated_at' => Yii::t('app', 'Company Updated At'),
        ];
    }
}
